import request from '@/config/axios'

// 技能标签 VO
export interface SkillVO {
  id: number // 技能标签ID
  name: string // 标签名
  status: number // 0:启用，1：禁用
  type: number // 0:系统，1：自定义
}

// 技能标签 API
export const SkillApi = {
  // 查询技能标签分页
  getSkillPage: async (params: any) => {
    return await request.get({ url: `/member/skill/page`, params })
  },

  // 查询技能标签详情
  getSkill: async (id: number) => {
    return await request.get({ url: `/member/skill/get?id=` + id })
  },

  // 新增技能标签
  createSkill: async (data: SkillVO) => {
    return await request.post({ url: `/member/skill/create`, data })
  },

  // 修改技能标签
  updateSkill: async (data: SkillVO) => {
    return await request.put({ url: `/member/skill/update`, data })
  },

  // 删除技能标签
  deleteSkill: async (id: number) => {
    return await request.delete({ url: `/member/skill/delete?id=` + id })
  },

  // 导出技能标签 Excel
  exportSkill: async (params) => {
    return await request.download({ url: `/member/skill/export-excel`, params })
  },
}